package plantFitght.bean;

import plantFitght.Demo;

import javax.imageio.ImageIO;
import java.awt.*;
import java.awt.image.BufferedImage;
import java.io.IOException;

//小敌机
public class Plant extends FightObject {
    private static Image img;
    static{
        //获取img
        try {
            img = ImageIO.read(Demo.class.getResourceAsStream("pic/background.png"));
        } catch (IOException e) {
            e.printStackTrace();
        }
    }

    @Override
    public void die() {

    }

    public Plant() {
        super((int)Math.random()*450,0,img,20,20);
    }

    @Override
    public void move() {
        y++;
    }
}
